package com.java.struts.base.http;

import java.io.UnsupportedEncodingException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;

public class HttpRequestWrapper extends HttpServletRequestWrapper {

	private HttpServletRequest request;
	
	public HttpRequestWrapper(HttpServletRequest request) {
		super(request);
		this.request = request;	
	}

	
	@Override
	public String getParameter(String name) {
		String value = request.getParameter(name);
		try {
			value = new String(value.getBytes("iso-8859-1"),"utf-8");
		} catch (UnsupportedEncodingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return value;
	}
}
